//
//  RootModel.m
//  22-TTPOD
//
//  Created by dllo on 16/8/13.
//  Copyright © 2016年 ZHW. All rights reserved.
//

#import "RootModel.h"
#import "Data.h"

@implementation RootModel
- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"data"]) {
        NSMutableArray<Data *> *dataArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            Data *data = [Data modelWithDic:dic];
            [dataArr addObject:data];
        }
        _dataArray = dataArr;
    }
}
@end
